//
//  GJFInspirationCollectionViewCell.m
//  Wedding
//
//  Created by 郭静芬 on 2017/1/8.
//  Copyright © 2017年 郭静芬. All rights reserved.
//

#import "GJFInspirationCollectionViewCell.h"

@interface GJFInspirationCollectionViewCell ()
@end

@implementation GJFInspirationCollectionViewCell

- (instancetype)initWithFrame:(CGRect)frame
{
    self = [super initWithFrame:frame];
    if (self) {
        
    }
    return self;
}

- (void)setInspirationModel:(GJFInspirationModel *)inspirationModel {
    _inspirationModel = inspirationModel;
    [self.imageV sd_setImageWithURL:[NSURL URLWithString:inspirationModel.img_url] placeholderImage:[UIImage imageNamed:@"占位图"]];
}

- (void)applyLayoutAttributes:(UICollectionViewLayoutAttributes *)layoutAttributes {
    [super applyLayoutAttributes:layoutAttributes];
    self.imageV.frame = self.contentView.bounds;
}

- (UIImageView *)imageV {
    if (!_imageV) {
        _imageV = [[UIImageView alloc] init];        
        [self.contentView addSubview:_imageV];
    }
    return _imageV;
}

@end
